public class Solution {
    public int removeElement(int[] nums, int val) {

        int Len = 0;

        for (int i = 0; i < nums.length; i++) {

            if(nums[i] != val){

                nums[Len] = nums[i];

                Len++;

            }

        }

        return  Len;

    }
}
